package com.example.demo.controller;

import com.example.demo.dto.StudentRecordDTO;
import com.example.demo.service.StudentManagementService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/student-management")
@CrossOrigin
public class StudentManagementController {

    @Autowired
    private StudentManagementService studentManagementService;

    @Operation(summary = "获取所有学生及其MBTI测试记录")
    @GetMapping("/record")
    public List<StudentRecordDTO> getAllStudentRecords() {
        return studentManagementService.getAllStudentRecords();
    }
}
